import Vuex from 'vuex'

const store = new Vuex.Store({
    state:{
        canBack: true
    },
    mutations:{
        allowBack: state => state.canBack = true,
        notAllowBack: state => {
            state.canBack = false
            history.pushState(null, null, location.href)
        }
    }
})

export default store;
